package com.foreknow.controller;

import com.foreknow.bean.Admin;
import com.foreknow.service.AdminService;
import com.foreknow.service.impl.AdminServiceImpl;
import com.sun.net.httpserver.HttpsServer;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class Delete extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setContentType("text/html;charset=utf-8");
        String id = req.getParameter("id");


        req.getRequestDispatcher("/manage?q=delete&id="+id).forward(req,resp);


        PrintWriter writer = resp.getWriter();

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        resp.setContentType("text/html;charset=utf-8");
//        RequestDispatcher id = req.getRequestDispatcher("id");
//
//
//        req.getRequestDispatcher("/manage?q=delete&id="+id).forward(req,resp);
//
//
//        PrintWriter writer = resp.getWriter();
//        writer.println(123);

    }
}
